﻿using System.Collections.Generic;
using System;
using System.ComponentModel.DataAnnotations;

namespace Mt.Site.Application.Dto
{
    public class SwapSortNumberWithMenuIdInput : SwapSortNumberInput
    {
        public long MenuId { get; set; }

        public Guid? RelateId { get; set; }

    }

    public class SwapSortNumberInput : SwapSortNumberInput<Guid>
    {
    }

    public class SwapSortNumberInput<TPrimaryKey> where TPrimaryKey : struct, IComparable
    {
        public List<IdAndOrder<TPrimaryKey>> IdOrderList { get; set; }
    }

    public class IdAndOrder<TPrimaryKey> where TPrimaryKey : struct, IComparable
    {
        [Required]
        public TPrimaryKey Id { get; set; }

        [Required]
        public int Order { get; set; }
    }
}
